package com.ccys.doctor.service.impl;

import com.ccys.common.vo.ResponseResultApp;
import com.ccys.db.cache.UserUtil;
import com.ccys.db.entity.TblDoctor;
import com.ccys.db.mapper.TblDiagnosisMapper;
import com.ccys.db.vo.doctor.diagnosis.GetAllDiagnosisVo;
import com.ccys.doctor.service.DiagnosisService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @program: WhiteCoat
 * @description: 诊断相关接口
 * @author: ZhangJingCan
 * @create: 2024-02-08 16:37
 **/

@Service
public class DiagnosisServiceImpl implements DiagnosisService {

    @Resource
    private TblDiagnosisMapper tblDiagnosisMapper;

    @Override
    public ResponseResultApp<List<GetAllDiagnosisVo>> getAllDiagnosis() {
        TblDoctor doctor = UserUtil.getCurLoginDoctor();
        List<GetAllDiagnosisVo> list = tblDiagnosisMapper.getAllDiagnosisByDoctorId(doctor.getId());
        return ResponseResultApp.success(list);
    }
}
